function [ ] = necromancy2( img, skeleton )
% Reconstruct an image from a skeleton and the distance transform
imgbin = blockBinarization(img, 1);
imgdist = double(bwdist(imgbin));
figure; imshow(imgbin + skeleton); hold on;
[M, N] = size(skeleton);
for i = 1:1:M
    for j = 1:1:N
        radius = floor(imgdist(i,j));
        if skeleton(i,j) == 1 && radius > 0 && mod(i, 5) == 0 && mod(j, 5) == 0 % random('unid', 20) == 1
            circle(j, i, radius);
        end    
    end
end
end

